<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Title</title>
</head>
<body>

<div id="app">
  <ul>
    <li v-for="(item,index) in names"
        :class="{active: currentIndex === index}"
        @click="liClick(index)">
      {{index}}.{{item}}
    </li>
  </ul>
</div>

<script src="../js/vue%20.js"></script>
<script>
  const app = new Vue({
    el:'#app',
    data:{
      names:['火影忍者','海贼王','银魂'],
      currentIndex:0
    },
    methods: {
      liClick(index) {
         this.currentIndex = index
      }
    }
  })
</script>
</body>
</html>